/*******************************************************************************
*  file    : traindata.cpp
*  created : 06.07.2013
*  author  : 
*******************************************************************************/

#include "traindata.hpp"



StationPoint::StationPoint(const QJsonObject& jo) :
    station_id()
{
    if( ! jo.isEmpty() )
        {
            station_id   =  jo.value("station_id").toString().toInt();
            station_name =  jo.value("station").toString();
            time.setTime_t( static_cast<uint>(jo.value("date").toDouble()));
        }
}


PlaceType::PlaceType(const QJsonObject& jo) :
    places()
{
    if( ! jo.isEmpty() )
        {
            title = jo.value("title").toString();
            letter = jo.value("letter").toString();
            places = static_cast<int>(jo.value("places").toDouble());
        }
}
